package it.paceGiuseppe.sols.ciambelle;

public class Pulizia extends Thread {

	private MonitorCiambelle monitor;
	
	
	
	
	public Pulizia(MonitorCiambelle monitor) {
		super();
		this.monitor = monitor;
	}




	@Override
	public void run() {
		while(true)
		{
			try {
				monitor.acquisizioneNastro();
				System.out.println("Pulizia nastro");
				sleep(1000);
				monitor.rilascioNastro();
				
				monitor.richiestaForno();
				
				System.out.println("Pulizia forno");
				sleep(1000);
				
				monitor.rilascioForno();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
